import sys

from sqlalchemy import create_engine
from sqlalchemy.orm import Session

sys.path.append('..')
from codeforces_task_search import settings


record_connect_to_db = '{}+{}://{}:{}@{}/{}'.format(
     settings.DIALECT_DB,
     settings.DRIVER_DB,
     settings.USERNAME_DB,
     settings.USER_PASSWORD_DB,
     settings.HOST_DB,
     settings.NAME_DB
)
engine = create_engine(record_connect_to_db)
session = Session(bind=engine)
